import { Injectable, NestMiddleware } from '@nestjs/common';
import { NextFunction, Request, Response } from 'express';

// 全局中间件
@Injectable()
export class LoggerMiddleware implements NestMiddleware {
  use(req: Request, res: Response, next: NextFunction) {
    console.log(`--中间件logger: ${req.url}-------`);
    next();
    console.log(`---------------end---------------`);
    console.log(``);
  }
}
